package com.bms.main;

/**
 * Circle class.
 */
public class Circle {
	private static final double PI = 3.14;
	private double radius;

	/**
	 * Prints the circles radius and circumference. pre: none post: The radius
	 * and the circumference of the circle should be posted.
	 */
	public static void main(String[] args) {
		Circle spot = new Circle();
		spot.setRadius(3);
		System.out.println("Circle radius: " + spot.getRadius());
		System.out.println("Circle circumference: " + spot.getCircumference());
	}

	/**
	 * constructor pre: none post: A Circle object created. Radius initialized
	 * to 1.
	 */
	public Circle() {
		radius = 1; // default radius
	}

	/**
	 * Changes the radius of the circle. pre: none post: Radius has been
	 * changed.
	 */
	public void setRadius(double newRadius) {
		radius = newRadius;
	}

	/**
	 * Calculates the area of the circle. pre: none post: The area of the circle
	 * has been returned.
	 */
	public double area() {
		double circleArea;
		circleArea = PI * radius * radius;
		return (circleArea);
	}

	/**
	 * Returns the radius of the circle. pre: none post: The radius of the
	 * circle has been returned.
	 */
	public double getRadius() {
		return (radius);
	}
	public double getCircumference() {
		double circumference = 0;
		circumference = 2*Math.PI*radius;
		return circumference;
	}
	
}